class Array
	def my_each
		c = 0
		until c == size
			yield(self[c])
			c += 1
		end
		self
	end
	def my_map
		c = 0
		acc = []
		until c == size
			acc << yield(self[c])
			c += 1
		end
		acc
	end
end

class Integer
	def my_times
		num = self
		(1..num).each do |i|
			yield i
		end
	end
end

5.my_times {|i| puts "#{i}"}
names = ["David","Alan","Black"]
print (names.my_map{|name| name.upcase})
		